using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;

namespace TaugeLibrary.Classes
{
    
    public class TaugeCommand
    {
        public enum eCOMMANDTYPE
        {
            ERROR_ON_EXISTS,
            ERROR_ON_NOT_EXISTS,
            EXECUTE_QUERY,
            EXECUTE_NON_QUERY,
            RETREIVE_IDENTITY
        }
        
        private SqlCommand m_sql_command;
        private eCOMMANDTYPE m_type;
        private object m_ext;

        public SqlCommand SQL_Command { get { return m_sql_command; } set { m_sql_command = value; } }
        public eCOMMANDTYPE Type { get { return m_type; } set { m_type = value; } }
        public object Extension { get { return m_ext; } set { m_ext = value; } }

        public TaugeCommand():this(""){}
        public TaugeCommand(string p_sql):this(new SqlCommand(p_sql)){}
        public TaugeCommand(SqlCommand p_sc) : this(p_sc, eCOMMANDTYPE.EXECUTE_NON_QUERY, null) { }
        public TaugeCommand(string p_sql, eCOMMANDTYPE p_type, object p_ext) : this(new SqlCommand(p_sql), p_type, p_ext) { }
        public TaugeCommand(SqlCommand p_sc, eCOMMANDTYPE p_type, object p_ext)
        {
            SQL_Command = p_sc;
            Type = p_type;
            Extension = p_ext;
        }

    }
}
